package com.hdcircles.autoform.dagger.module;

import com.hdcircles.autoform.app.App;
import com.hdcircles.autoform.dagger.ContextLife;
import com.hdcircles.autoform.model.http.LocationHelper;
import com.hdcircles.autoform.model.http.RetrofitHelper;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by hdcircles on 2016/9/21.
 */
@Module
public class AppModule {
    private final App application;

    public AppModule(App application){
        this.application=application;
    }

    @Provides
    @Singleton
    @ContextLife("Application")
    App provideApplicationContext(){return application;}


    @Provides
    @Singleton
    RetrofitHelper provideRetrofitHelper(){
        return new RetrofitHelper();
    }



    @Provides
    @Singleton
    LocationHelper provideLocationHelper(){return new LocationHelper(application);}

}
